<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>88.合并两个有序数组</title>
</head>

<body>

</body>

<script>
    /**
    * @param {number[]} nums1
    * @param {number} m
    * @param {number[]} nums2
    * @param {number} n
    * @return {void} Do not return anything, modify nums1 in-place instead.
    */
    var merge = function (nums1, m, nums2, n) {
        nums1.splice(m, n, ...nums2);
        nums1.sort((a, b) => {
            return a - b;
        });
        console.log(nums1);
    };
    merge([1, 2, 3, 0, 0, 0], 3, [2, 5, 6], 3);
</script>

</html>